#ifndef SHADERSYSTEM_H_
#define SHADERSYSTEM_H_

#include <GL/glew.h>

#include <string>
#include <vector>

#include "log.h"
#include "util.h"

class CShaderSystem
{

private:
	
	std::vector< GLuint > m_vPrograms;
	
	GLuint GetShader( int, std::string );

public:
	
	void CreateProgram( std::string, std::string );

	inline GLint GetUniformLocation( int i, const std::string & name )
	{
		
		return glGetUniformLocation( m_vPrograms[i], name.c_str() );
		
	}
	
	inline GLint GetAttribLocation( int i, const std::string & name )
	{
		
		return glGetAttribLocation( m_vPrograms[i], name.c_str() );
		
	}
	
	inline void SetProgram( int i )
	{
		
		glUseProgram( m_vPrograms[i] );
		
	}
	
	~CShaderSystem();
	
};

#endif
